/*****************************************************************************
*
*  PROJECT:     SlipStream
*               (CSound3D Class)
*  LICENSE:     GNU General Public License v3 - http://www.gnu.org/licenses/gpl.html

*  DEVELOPERS:  Philip Farquharson 	<B00137077@studentmail.uws.ac.uk>
*				John Gray 			<B00145524@studentmail.uws.ac.uk>		
*				Zohaib Bhatti		<B00104280@studentmail.uws.ac.uk>
*				Euan Hislop 		<B00138636@studentmail.uws.ac.uk>
*
*****************************************************************************/
#ifndef CSOUND3D_H
#define CSOUND3D_H

#include <stdio.h>
#include "irrKlang/irrKlang.h"
#include "conio.h"
#include "CVector3.h"

using namespace irrklang;

class CSound3D
{
	private:
		ISound* m_SoundInterface; // irrKlang sound interface

	public:
		CSound3D ( ISound* SoundInterface ); // constructor, takes an irrKlang sound interface created in CSoundManager
		~CSound3D ( void ); // destructor

		void SetPaused ( bool bPaused )					{ m_SoundInterface->setIsPaused( bPaused ); }
		bool GetPaused ( void )							{ return m_SoundInterface->getIsPaused(); }

		void SetLooped ( bool bPaused )					{ m_SoundInterface->setIsLooped( bPaused ); }
		bool GetLooped ( void )							{ return m_SoundInterface->isLooped(); }

		void SetVolume ( float fVolume )					
		{ 
			if (fVolume>1.0f) 
				fVolume = 1.0f; 
			else if (fVolume < 0.0f)
				fVolume = 0.0f;
				
			m_SoundInterface->setVolume(fVolume);  
		}
		float GetVolume ( void )							{ return m_SoundInterface->getVolume(); }

		void setPosition ( CVector3 vecPosition );
		CVector3 getPosition ( void );

		float GetMinDistance ( void )						{ return m_SoundInterface->getMinDistance(); }
		void SetMinDistance ( float fDistance )				{ return m_SoundInterface->setMinDistance(fDistance); }

		float GetMaxDistance ( void )						{ return m_SoundInterface->getMaxDistance(); }
		void SetMaxDistance ( float fDistance )				{ return m_SoundInterface->setMaxDistance(fDistance); }
};
#endif